//
//  UILabe+Extensions.swift
//  weibo
//
//  Created by 陈勇 on 16/2/25.
//  Copyright © 2016年 chenyong. All rights reserved.
//

import UIKit

extension UILabel{

  //  convenience init(text: String, fontSize: CGFloat = 14, color: UIColor = UIColor.darkGrayColor())

    convenience init(cz_text text: String,
        fontSize: CGFloat = 14,
        color: UIColor = UIColor.darkGrayColor(),
        alignment: NSTextAlignment = .Left) {
            
            self.init()
            
            self.text = text
            self.textColor = color
            self.font = UIFont.systemFontOfSize(fontSize)
            self.textAlignment = alignment
            
            self.numberOfLines = 0
            
            // 自动调整大小
            sizeToFit()
    }
}